<?php
/**
 * 构造函数 ，判断是否登陆
 */
namespace app\admin\controller;
use think\Controller;
use think\Loader;
use think\Request;
class Common extends Controller
{
    public function __construct(request $request = null)
    {
        parent::__construct($request);
        // 执行登陆验证
        if(!session('admin.admin_username')){
            $this->redirect('Login/login');
        }
    }
}